//
//  DbManage.h
//  02-FMDB的简单使用
//
//  Created by Jiafei Wei on 16/7/24.
//  Copyright © 2016年 apple. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "RemingThings.h"
#import "StockCode.h"
@interface DbManage : NSObject
+(DbManage *)shareDbManage;

-(void)insert:(RemingThings *)model;

-(NSMutableArray *)query;
-(void)deleteData:(RemingThings*)model;
-(void)update:(RemingThings*)model;

-(void)deleteThingsArrary:(NSMutableArray *)arry;

//股票操作
-(void)insertStock:(StockCode *)code;
-(NSMutableArray *)queryStock;
-(void)deleteStock:(StockCode *)code;
-(void)updateStock:(StockCode *)code;
-(void)insertStockByArray:(NSMutableArray *)arry;

-(void)deleteStockArrary:(NSMutableArray *)arry;

-(void)deleteStockByCode:(NSString *)name;
-(void)deletAllStock;

-(void)updateStockByName:(StockCode *)code;

//联系人操作
-(void)insertConatctArray:(NSMutableArray *)contactArray;
-(void)updateConatctArray:(NSMutableArray *)contactArray;
-(void)deleteConatctArray:(NSMutableArray *)contactArray;
-(void)deleteContactAll;
-(NSMutableArray *)queryConatctArray;
-(NSMutableArray *)queryConatctArray:(NSString *)phone;
-(NSMutableArray*)queryConatctGroupArray;
-(void)deleteNewContactAll;
-(void)insertNewConatctArray:(NSMutableArray *)contactArray;
-(NSMutableArray *)queryNewConatctArray;

//个人信息
-(NSMutableArray *)queryPersonInfoByUserId:(NSString *)userId;
-(void)updatePersonInfo:(NSMutableArray *)contactArray;
-(void)insertPersonInfoArray:(NSMutableArray *)contactArray;
-(void)deleteAllPersonInfo;
//标记
-(void)insertMarkInfoArray:(NSMutableArray *)contactArray;
-(void)deleteMarkArray:(NSMutableArray *)contactArray;
-(void)updateMarkInfo:(NSMutableArray *)contactArray;
-(NSMutableArray *)queryMarkArray:(NSString *)number;
-(NSMutableArray *)queryMarkArray;

//拦截信息
-(void)insertInterceptInfoArray:(NSMutableArray *)contactArray;
-(NSMutableArray *)queryCallInterceptArray;
-(NSMutableArray *)querySmsInterceptArray;
-(void)updateInterceptInfo:(NSMutableArray *)contactArray;
-(void)deleteMarkInfoAll;
@end
